TOOL.Category		= "Doctor Who"
TOOL.Name			= "#TARDIS Destination Designator"
TOOL.Command		= nil
TOOL.ConfigName		= ""

if ( CLIENT ) then

	language.Add( "Tool_tardisremote_name", "TARDIS Destination Designator" )
	language.Add( "Tool_tardisremote_desc", "Designate TARDIS Destination Easily" )
	language.Add( "Tool_tardisremote_0", "Click to Designate" )

end

function TOOL:LeftClick( trace )

	local player = self:GetOwner()
	
	for _,v in pairs(ents.FindByClass("tardis")) do
		print("Found TARDIS")
		if ValidEntity(v) then
			print("TARDIS Valid")
			if v.Owner == player then
				v.Target = trace.HitPos
				v.Remote = true
				player:ChatPrint("TARDIS Location Set")
			end	
		end
	end
	
	for _,v in pairs(ents.FindByClass("tardis_smith")) do
		print("Found TARDIS")
		if ValidEntity(v) then
			print("TARDIS Valid")
			if v.Owner == player then
				v.Remote = true
				v.Target = trace.HitPos
				player:ChatPrint("TARDIS Location Set")
			end	
		end
	end
end

function TOOL:RightClick( trace )
	
	local player = self:GetOwner()
	
	for _,v in pairs(ents.FindByClass("tardis")) do
		print("Found TARDIS")
		if ValidEntity(v) then
			print("TARDIS Valid")
			if v.Owner == player then
				v:Shift()
			end	
		end
	end
	
	for _,v in pairs(ents.FindByClass("tardis_smith")) do
		print("Found TARDIS")
		if ValidEntity(v) then
			print("TARDIS Valid")
			if v.Owner == player then
				v:Shift()
			end	
		end
	end
end